<!--
 * @Author: zhang gen yuan
 * @Date: 2021-09-17 16:48:15
 * @Descripttion: 
-->
<template>
  <div class="paging">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="current"
      :page-sizes="[10, 20, 40]"
      :page-size="size"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
    >
    </el-pagination>
  </div>
</template>

<script setup>
import { defineProps, defineEmits } from "vue";
let props = defineProps({
  total: {
    type: Number,
    default: 100,
  },
  current: {
    type: Number,
    default: 1,
  },
  size: {
    type: Number,
    default: 10,
  },
});
let emit = defineEmits();
const handleSizeChange = (val) => {
  emit("handleSizeChange", val);
};
const handleCurrentChange = (val) => {
  emit("handleCurrentChange", val);
};
</script>

<style lang="scss" scoped>
.paging{
  width: 100%;
  display: flex;
  box-sizing: border-box;
  padding: 15px 100px 15px 15px;
  justify-content: flex-end;
}
</style>